package kr.saeildadim.androidexam_saeildamil.chapter13;

import kr.saeildadim.androidexam_saeildamil.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ProgressBar;

public class Ch13_ProgressEx extends Activity {
	ProgressBar mProgBar;
	ProgressBar mProgCircle;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch13_progressbarex);
		
		mProgBar = (ProgressBar) findViewById(R.id.ch13_progress_progressbar);
		mProgCircle = (ProgressBar) findViewById(R.id.ch13_progress_progress_circle);
		
	}
	public void mOnClick(View v){
		switch(v.getId()){
		case R.id.ch13_progress_progress_upbtn:
			mProgBar.incrementProgressBy(2);
			break;
		case R.id.ch13_progress_progress_dnbtn:
			mProgBar.incrementProgressBy(-2);
			break;
		case R.id.ch13_progress_progress_2upbtn:
			mProgBar.incrementSecondaryProgressBy(2);
			break;
		case R.id.ch13_progress_progress_2dnbtn:
			mProgBar.incrementSecondaryProgressBy(-2);
			break;
		case R.id.ch13_progress_progress_circle_startbtn:
			mProgCircle.setVisibility(View.VISIBLE);
			break;
		case R.id.ch13_progress_progress_circle_endbtn:
			mProgCircle.setVisibility(View.INVISIBLE);
			break;
		}
	}
}
